package flc.ast.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import flc.ast.R;
import flc.ast.activity.SelVideoActivity;
import flc.ast.databinding.FragmentVideoEditBinding;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link VideoEditFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class VideoEditFragment extends BaseNoModelFragment<FragmentVideoEditBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_video_edit;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);
        mDataBinding.ivVideoText.setOnClickListener(this);
        mDataBinding.ivVideoDecal.setOnClickListener(this);
        mDataBinding.ivVideoFilter.setOnClickListener(this);
        mDataBinding.ivVideoRotate.setOnClickListener(this);
        mDataBinding.ivVideoCut.setOnClickListener(this);
        mDataBinding.ivVideoUpend.setOnClickListener(this);
        mDataBinding.ivVideoBg.setOnClickListener(this);
        mDataBinding.ivVideoTailor.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()){
            case R.id.ivVideoText:
                SelVideoActivity.type=0;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoDecal:
                SelVideoActivity.type=1;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoFilter:
                SelVideoActivity.type=2;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoRotate:
                SelVideoActivity.type=3;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoCut:
                SelVideoActivity.type=4;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoUpend:
                SelVideoActivity.type=5;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoBg:
                SelVideoActivity.type=6;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.ivVideoTailor:
                SelVideoActivity.type=7;
                startActivity(SelVideoActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}